Automated message filtering systems have become popular as the number of unwanted electronic messages (also known as “spam”) increases. Some basic spam filtering products identify spam messages by searching for certain terms that are commonly present in spam messages, such as names of drugs and product descriptions The senders of spam messages (also referred to as ‘spammers’) have responded by substituting the typical spam indicator words with words that look similar to the average reader. For example, ‘Viagra’® is a drug often advertised in spam messages. The spammers may substitute the letter ‘a’ with an ‘@’ sign, use a backslash and a forward slash to form a character string ‘\/’ to represent the letter ‘V.’ Other commonly employed methods include keeping the first and last letters of the keyword correct but scrambling the letters in between, and using special characters to delimit phrases instead of spaces. For example, ‘Viagra’® may be represented as ‘\/1agra’ and ‘Buy Viagra® Here’ may be spelled as ‘*Buy*\/Igrae*here*.’ While the human reader can easily guess the meaning despite the misspelling and obfuscation, it is more difficult for the automated message filtering system to detect these random variations. It would be desirable if mutated spam messages can be detected. It would also be useful if the detection technique can be implemented without significantly increasing the requirements for computing resources such as memory and processing time.